import service from '../utils/request'




// 一级路由
export function user_yiji(payload = {}) {
    return service.get('/yiji',  {params:payload} )
}
// 二级路由
export function user_hang(payload = {}) {
    return service.get('/hang',  {params:payload} )
}
// 消息
export function user_xiaoxi(payload = {}) {
    return service.get('/xiaoxi',  {params:payload} )
}
// 登录
export function user_user(payload = {}) {
    return service.get('/user',  {params:payload} )
}
// 员工概况
export function user_Employee(payload = {}) {
    return service.get('/Employee1',  {params:payload} )
}



// 车辆分类
export function car_classification(payload = {}) {
    return service.get('/classification',  {params:payload} )
}
// 车辆分类新增
export function car_addclassification(payload = {}) {
    return service.post('/classification',  payload )
}
//车辆分类删除
export function car_deleteclassification( payload = {} ){
    return service.delete('/classification/'+payload.id, { params: payload  } );
}
//车辆分类id查询
export function car_editclassification( payload = {} ){
    return service.get('/classification/'+payload.id, { params: payload  } );
}
//车辆分类id修改
export function car_xiuclassification( payload = {} ){
    return service.patch(`/classification/${payload.id}`, payload);
}
//模糊查询车辆分类
export function car_searchclassification( payload = {} ){
    return service.get('/car', { params: payload  } );
}
// 车辆型号
export function car_type(payload = {}) {
    return service.get('/type',  {params:payload} )
}
// 车辆查看
export function car_car(payload = {}) {
    return service.get('/car',  {params:payload} )
}
// 车辆新增
export function car_addcar(payload = {}) {
    return service.post('/car', payload )
}
//模糊查询车辆
export function car_search( payload = {} ){
    return service.get('/car', { params: payload  } );
}
//车辆编辑
export function car_edit( payload = {} ){
    return service.get('/car/'+payload.id, { params: payload  } );
}
//车辆修改
export function car_xiucar( payload = {} ){
    return service.patch(`/car/${payload.id}`, payload);
}
//车辆删除
export function car_delete( payload = {} ){
    return service.delete('/car/'+payload.id, { params: payload  } );
}




// 用车查看
export function car_carrecords(payload = {}) {
    return service.get('/carrecords',  {params:payload} )
}
// 用车新增
export function car_addcarrecords(payload = {}) {
    return service.post('/carrecords',  payload )
}
//模糊查询车辆
export function car_searchcarrecords( payload = {} ){
    return service.get('/carrecords', { params: payload  } );
}


// 还车查看
export function car_recordcar(payload = {}) {
    return service.get('/recordcar',  {params:payload} )
}
//模糊查询还车
export function car_searchrecordcar( payload = {} ){
    return service.get('/recordcar', { params: payload  } );
}
//还车删除
export function new_deleterecordcar( payload = {} ){
    return service.delete('/recordcar/'+payload.id, { params: payload  } );
}
// 还车新增
export function car_addrecordcar(payload = {}) {
    return service.post('/recordcar',  payload )
}





// 新闻查看
export function new_newslist(payload = {}) {
    return service.get('/newslist',  {params:payload} )
}
// 新闻分类
export function new_newsfei(payload = {}) {
    return service.get('/newsfei',  {params:payload} )
}
// 新闻分类新增
export function new_addnewsfei(payload = {}) {
    return service.post('/newsfei',  payload )
}
//新闻分类删除
export function new_deletenewsfei( payload = {} ){
    return service.delete('/newsfei/'+payload.id, { params: payload  } );
}
//新闻分类id查询
export function new_editnewsfei( payload = {} ){
    return service.get('/newsfei/'+payload.id, { params: payload  } );
}
//新闻分类id修改
export function new_xiunewsfei( payload = {} ){
    return service.patch(`/newsfei/${payload.id}`, payload);
}
//模糊查询新闻分类
export function new_searchnewslist( payload = {} ){
    return service.get('/newslist', { params: payload  } );
}
//新闻删除
export function new_delete( payload = {} ){
    return service.delete('/newslist/'+payload.id, { params: payload  } );
}
//模糊查询新闻
export function new_search( payload = {} ){
    return service.get('/newslist', { params: payload  } );
}
// 新闻新增
export function new_addnews(payload = {}) {
    return service.post('/newslist', payload )
}
//新闻编辑
export function new_edit( payload = {} ){
    return service.get('/newslist/'+payload.id, { params: payload  } );
}
//新闻修改
export function new_xiunews( payload = {} ){
    return service.patch(`/newslist/${payload.id}`, payload);
}





//测试
export function api_login( payload = {} ){
    return service.get('/api/user/login', { params: payload  } );
}